using Gtk;
//using MySql.Data.MySqlClient;
//using Npgsql;
using System;
using System.Reflection;

using Serpis;

namespace PArticulo
{
	class MainClass
	{
		public static void Main (string[] args)
		{
			Assembly assembly = Assembly.Load("Npgsql, Version=2.0.0.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7");
			
//			foreach (Type t in assembly.GetTypes())
//				Console.WriteLine("Type={0}", t.FullName);
			
//			AppDbConnection.Instance.DbConnectionType = typeof(MySqlConnection);
//			AppDbConnection.Instance.ConnectionString = "Server=localhost;Database=dbprueba;User Id=root;Password=sistemas";
//			AppDbConnection.Instance.DbConnectionType = typeof(NpgsqlConnection);

			AppDbConnection.Instance.DbConnectionType = assembly.GetType("Npgsql.NpgsqlConnection");
			AppDbConnection.Instance.ParameterPrefix = ":";
			AppDbConnection.Instance.ConnectionString = "Server=localhost;Database=dbprueba;User Id=dbprueba;Password=sistemas";
			


			Application.Init ();
			MainWindow win = new MainWindow ();
			win.Show ();
			Application.Run ();
		}
	}
}
